<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 200px;
            height: 250px;
            overflow: hidden;
            border: #000 1px solid ;
            margin: 0 auto;
        }
        img{
            width: 200px;
            height: 200px;
        }
        .nav li{
            float: left;
            width: 50px;
            height: 50px;
            list-style: none;
            line-height: 50px;
            text-align: center;
            border: #000 solid 1px;
            box-sizing: border-box;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div id="app" class="box">
        <img :src="imgUrl" alt="">
        <ul class="nav">
            <li @click="imgUrl = item" v-for="(item,index) of arr" :key="index">
                {{index + 1}}
            </li>
        </ul>
    </div>
    <script src="script/vue.js"></script>
    <script>
        const vue = new Vue({
            data () {
                return{
                    arr : [
                        "images/1.jpg",
                        "images/2.jpg",
                        "images/3.jpg",
                        "images/4.jpg"
                    ],
                    imgUrl:"images/1.jpg"
                }
            }
        })
        vue.$mount("#app")
    </script>
</body>
</html>